if exists (select 1 from sysobjects where name = 'del_pensum' and type = 'P')
begin
   drop procedure del_pensum
   print 'Procedure: del_pensum deleted ...'
end
go
create procedure del_pensum(
  @prsid          int   = 1,
  @von            char(8),
  @bis            char(8),
  @pensum         int
)
as
begin
  set nocount on
  
  delete from Arbeitspensum 
   where PrsID = @prsid 
     and Von = @von
     and Bis = @bis
     and Prozent = @pensum

end
go
print 'Procedure: del_pensum done ...'
go
grant exec on del_pensum to prsadmins with grant option
go
grant exec on del_pensum to prsusers
go

